<#compress>
<!DOCTYPE html>
<html>
	<head>
		<title>权限控制</title>
		<meta name="keywords" content="keyword1,keyword2,keyword3">
		<meta name="description" content="this is my page">
		<meta name="content-type" content="text/html; charset=UTF-8">
		<base href="${webroot}">
		<#include "../../template/easyui.ftl" parse="true" encoding="UTF-8">
		<script type="text/javascript" src="res/rbac/tree.js"></script>
		<script type="text/javascript" src="res/rbac/permissionControl.js"></script>
	</head>
	<body>
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'west',split:true,border:false" style="width:20%;">
	            	<div class="easyui-panel" style="padding:5px;border: 0px">
						<ul id="grouptree"  class="easyui-tree" data-options="url:'role/role_native_tree.tree',loadFilter:convert,lines:true,onSelect:module.onSelectTree" 
					 style="padding-top: 10px;"></ul>
					</div>
	            </div>
			<div data-options="region:'center',border:false">
				<table class="easyui-datagrid"  id="module_datagrid"
				  		 data-options="
				  		 	striped:true,
				  		 	border:false,
				  		 	url: 'permissionControl/permissionCtllist.grid',
				  		 	method: 'get',
				  		 	rownumbers: true,
				  		 	pagination: true,
				  		 	fit: true,
				  		 	toolbar: '#tb',
				  		 	border:false
				  		 ">
					<thead>
						<tr>
							<th data-options="field:'id',width:50,checkbox:true">ID</th>
							<th data-options="field:'r_name',width:100">角色名称</th>
							<th data-options="field:'r_status',width:80,align:'center',
								formatter:formatterStatus">角色状态</th>
							<th data-options="field:'r_remarks',width:250,
								formatter:function(value, row, index) {
									return Common.Util.formatter(value);
								}">角色备注</th>
							<th data-options="field:'a_name',width:100">权限名称</th>
							<th data-options="field:'a_status',width:80,align:'center',
								formatter:formatterStatus">权限状态</th>
							<th data-options="field:'a_remarks',width:250,
								formatter:function(value, row, index) {
									return Common.Util.formatter(value);
								}">权限备注</th>
						</tr>
					</thead>
				</table>
				<div id="tb" style="padding:5px;height:auto">
					<div style="margin-bottom:5px">
						角色名称: <input id="rolename" class="easyui-textbox" data-options="prompt:'输入关键字进行查询'" style="width:140px;">
						权限名称: <input id="authorityname" class="easyui-textbox" data-options="prompt:'输入关键字进行查询'" style="width:140px;">
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-search" onclick="module.queryDatagrid();">查询</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-reload" onclick="module.refreshDatagrid();">刷新</a>
						<br>
						<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-add" action="add" onclick="module.openDialog();">新增</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-no" action="deleted" onclick="module.deleted();">删除</a>
					</div>
				</div>
			</div>

			<div id="module_dialog" class="easyui-dialog" title="编辑"
				style="width:360px;height:450px;padding-left: 20px;padding-top: 10px;"
				data-options="resizable:true,modal:true,buttons:'#dlg-buttons',closed:true">
				<form name="module_from" id="module_from" method="post">
					<div>
						<font style="font-size: 14px;">角色:</font><br />
							<input name="rid" id="rid" class="easyui-combotree" style="width:300px;"
									data-options="
										url: 'role/role_native_tree.tree',
										editable: false,
										valueField: 'id',
										textField: 'text',
										loadFilter:convert,
										required:true"/><br>
							<br />
					</div>
					<div>
						<font style="font-size: 14px;">权限:</font>
						<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-load" onclick="$('#authoritytree').tree('expandAll');;">展开</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-load" onclick="$('#authoritytree').tree('collapseAll');;">收缩</a>
						<br />
						<ul class="easyui-tree" id="authoritytree" style="padding-top: 10px;"
							data-options="
								url: 'authority/authority_navigate_tree.tree',
								method: 'post',
								lines: true,
								checkbox: true,
								loadFilter: convert,
								cascadeCheck:false
						"></ul>
					</div>
				</form>
			</div>
			<div id="dlg-buttons">
				<a href="javascript:void(0)" class="easyui-linkbutton" onclick="module.edit()">保存</a>
				<a href="javascript:void(0)" class="easyui-linkbutton" onclick="module.closeDialog()">取消</a>
			</div>
		</div>
	</body>
</html>
</#compress>